#include <QApplication>
#include <QDialog>
#include <QPushButton>
#include <QCheckBox>
#include <QLabel>
#include <QVBoxLayout>
#include <QHBoxLayout>

int main(int c, char **v)
{
	QApplication app (c, v);
	
	QDialog d(NULL);
	
	QHBoxLayout *hmainlay=new QHBoxLayout();
	QVBoxLayout *vlay=new QVBoxLayout();
	QHBoxLayout *hlay=new QHBoxLayout();
	
	hmainlay->addWidget(new QLabel("First", &d));
	hmainlay->addItem(vlay);
	
	vlay->addWidget(new QLabel("Head", &d));
	//hlay->addItem(new QSpacerItem(2000, 20, QsizePolicy::Maximum));
	hlay->addWidget(new QPushButton("Hello World", &d));
	hlay->addWidget(new QCheckBox("Check me please", &d));
	
	vlay->addItem(hlay);
	vlay->addWidget(new QLabel("Footer", &d));
	
	//d.layout()->addWidget(new QPushButton("Hello World", &d));
	//d.layout()->addWidget(new QCheckBox("Check me please", &d));
	
	d.setLayout(hmainlay);
	//d.setLayout(new QHBoxLayout());	
	d.show();
	
	return app.exec();
}
